package cn.stylefeng.guns.modular.hp.service;

import cn.stylefeng.guns.modular.hp.model.ExpertDepartmentLinkInfo;
import com.baomidou.mybatisplus.service.IService;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 专家科室关联关系表 服务类
 * </p>
 *
 * @author xzqiang
 * @date 2019-6-10
 */
public interface IExpertDepartmentLinkInfoService extends IService<ExpertDepartmentLinkInfo> {

    List<Map<String, Object>> list();

    /**
     * 根据专家ID获取关联关系列表
     * @param expertInfoId
     * @return
     */
    List<ExpertDepartmentLinkInfo> getLinkInfoByExpertInfoId(String expertInfoId);

    /**
     * 根据科室信息ID获取关联信息列表
     * @param departmentInfoId
     * @return
     */
    List<ExpertDepartmentLinkInfo> getLinkInfoByDepartmentInfoId(String departmentInfoId);

    /**
     * 根据部门ID和专家ID获取关联关系ID
     * @param departmentInfoId
     * @param expertInfoId
     * @return
     */
    ExpertDepartmentLinkInfo getLinkInfoByDepartmentInfoIdAndExpertInfoId(String departmentInfoId, String expertInfoId);

    /**
     * 根据部门ID和专家ID获取关联关系ID
     * @param departmentInfoId
     * @param expertInfoId
     * @return
     */
    int deleteByDepartmentInfoIdAndExpertInfoId(String departmentInfoId, String expertInfoId);

    /**
     * 设置科室和专家的关联关系
     * @param departmentIds
     * @param expertInfoId
     */
    void setDepartmentLink(String departmentIds, String expertInfoId);
}
